package com.lovetemperature.action;

import java.util.List;

import com.lovetemperature.model.Member;
import com.lovetemperature.model.Order;
import com.lovetemperature.service.OrderService;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class MyOrdersAction extends ActionSupport{
	private OrderService orderService;
	
	private Member member;
	private List<Order> orderList;
	
	public String show() throws Exception {
		member = (Member) ActionContext.getContext().getSession().get("user");
		orderList = orderService.findByMemberId(member.getMemberId());
		return super.execute();
	}

	public List<Order> getOrderList() {
		return orderList;
	}

	public void setOrderList(List<Order> orderList) {
		this.orderList = orderList;
	}

	public OrderService getOrderService() {
		return orderService;
	}

	public void setOrderService(OrderService orderService) {
		this.orderService = orderService;
	}
}
